package com.project_doctor.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.project_doctor.pojo.Institution;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.project_doctor.pojo.dto.InstitutionSearchDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author xixif
* @description 针对表【t_institution(医疗机构信息表)】的数据库操作Mapper
* @createDate 2025-06-11 11:29:35
* @Entity com.project_doctor.pojo.Institution
*/
public interface InstitutionMapper extends BaseMapper<Institution> {

    List<Institution> selectInstitution(@Param("page") Page<Institution> page,
                                        @Param("query") InstitutionSearchDTO searchDTO);

    @Select("SELECT DISTINCT 0 as id, name FROM t_institution ORDER BY name")
    List<Institution> getAllInstitutions();
}




